package ${gen.packageName}.${gen.subPackageName}.service.base;

import com.jfinal.aop.Enhancer;
import com.jfinal.plugin.activerecord.Page;
import ${gen.packageName}.${gen.subPackageName}.model.${entity.MODEL_NAME};
import ${gen.packageName}.${gen.subPackageName}.dao.${entity.MODEL_NAME}Dao;
import com.msteam.kernel.orm.service.BaseService;

public class Base${entity.MODEL_NAME}Service extends BaseService<${entity.MODEL_NAME}> {
	protected ${entity.MODEL_NAME}Dao dao = Enhancer.enhance(${entity.MODEL_NAME}Dao.class);
	
	public Base${entity.MODEL_NAME}Service() {
		super(${entity.MODEL_NAME}.class);
	}
	
	/**
	 * 普通分页
	 * @param pageNumber 页号
	 * @param pageSize 每页记录数
	 * @param orderby 排序
	 * @return
	 */
	public Page<${entity.MODEL_NAME}> paginate(int pageNumber, int pageSize , String orderby) {
		return dao.paginate(pageNumber, pageSize, "", orderby);
	}
}
